<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>求红白黑球的个数</title>
</head>
<body>
    <script>
        let total = (25 + 31 + 28) / 2;
        let r = total - 31; // 红球数
        let w = total - 28; // 白球数
        let b = total - 25; // 黑球数
        alert(`红球:${r}\n白球:${w}\n黑球:${b}`);
    </script>
</body>
</html>